<?php


namespace app\admin\model;

use think\Model;

class CommunityModel extends Model
{
    // 开启自动写入时间戳字段
    protected $autoWriteTimestamp = true;
    // 定义时间戳字段名
    protected $createTime = 'create_at';
    protected $updateTime = 'update_at';

    public function companyInfo()
    {
        return $this->hasOne('CompanyModel', 'id', 'company_id');
    }
}